package com.boat.io.asmr111;

import com.boat.io.LineFilter;

import java.util.ArrayList;
import java.util.List;

public class FilterFactory {

    public static LineFilter getFilter(String ctype){
        if(ctype.equalsIgnoreCase("title")){
            return new TitleLineFilter();
        }else if(ctype.equalsIgnoreCase("mp3")){
            return new Mp3LineFilter();
        }
        return null;

    }


    public static List<LineFilter> getFilters(List<String> ctypes){
        List<LineFilter> list = new ArrayList<LineFilter>();
        for (String ctype : ctypes) {
            list.add(getFilter(ctype));
        }
        return list;
    }
}
